<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <!--      <meta http-equiv="X-UA-Compatible" content="IE=edge">-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>修改标签</title>
    <link rel="stylesheet" href="updateTag.css">
</head>

<body>

<h4>
    欢迎您：<text th:text="${session.doctorVO.name}"></text>&ensp;
    科室：<text th:text="${session.doctorVO.office}"></text>&ensp;
    权限：<text th:text="${session.doctorVO.role}"></text>
</h4>

<div class="select">
    <a href="/listAllPatient">
        <input type="submit" class="button" value="标签绑定">
    </a>
    <a href="/listAllTags">
        <input type="submit" class="button" value="标签管理">
    </a>
    <hr>
</div>

<h2>修改标签</h2>
<form method="post" action="/updateTagById" enctype="multipart/form-data" id="updateTagById">
    <input type="hidden" name="tag_id" th:value="${tag.tag_id}">
    标签名:<input type="text" name="tag_name" th:value="${tag.tag_name}">
    分组:<select name="tag_group">
    <option th:each="group:${groupList}" th:value="${group.id}" th:text="${group.description}" th:selected="${tag.tag_group}==${group.id}"></option>
        </select>
    <input type="datetime-local" placeholder="请选择日期" name="tag_start_time" step="1" th:value="${#strings.substring(tag.tag_start_time,0,10)}+T+${#strings.substring(tag.tag_start_time,11,19)}">
    <input type="datetime-local" placeholder="请选择日期" name="tag_end_time" step="1" th:value="${#strings.substring(tag.tag_end_time,0,10)}+T+${#strings.substring(tag.tag_end_time,11,19)}">
    <!--                <input type="hidden" name="pageFirst" th:value="${pageFirst}">-->
    科室:<select name="tag_office">
    <option th:each="office:${officeList}" th:value="${office.id}" th:text="${office.description}" th:selected="${tag.tag_office}==${office.id}"></option>
        </select>
    程度:<select name="tag_weight">
    <option th:each="weight:${weightList}" th:value="${weight.id}" th:text="${weight.description}" th:selected="${tag.tag_weight}==${weight.id}"></option>
        </select>
    <input type="hidden" name="oid" th:value="${session.doctor.oid}">
    <input type="hidden" name="role" th:value="${session.doctor.role}">
    <button>
        <a onclick="document:updateTagById.submit()">提交</a>   <!--提交-->
    </button>
    <a th:text="${lt_message}" style="color: red"></a>   <!--总信息-->

</form>
</body>

</html>